#ifndef _CLIST_H
#define _CLIST_H

#include <gtk/gtk.h>

#define MAX_TEXT_LEN 128
#define MAX_COLUMNS 10
#define MAX_CLIST_NAME 30
/**
 * struct clist_struct - two GtkWidget GtkCList descriptor
 * @clist_show:                          a GtkWidget which used to show informations
 * @show_all_row:                     there has show_all_row informations in clist_show
 * @show_selected_row:            which row has been selected in clist_show
 * @show_selected_columns:     which columns has been selected in clist_show
 * @clist_group:                         a GtkWidget which used to show all groups
 * @group_all_row:                    there has group_all_row informations in clist_group
 * @group_selected_row:           which row has been selected in clist_group
 * @group_selected_columns:    which columns has been selected in clist_group
 */
struct clist_struct {
	GtkWidget *clist_show;
	gint *show_all_row;
	gint show_selected_row;
	gint show_selected_column;
	
	GtkWidget *clist_group;
	gint *group_all_row;
	gint group_selected_row;
	gint group_selected_column;
	
	GtkWidget *statusbar;
};

extern struct clist_struct clist;
/*
 * init structure clist_struct
 */
static void init_clist_struct(struct clist_struct *clist)
{
	clist->clist_show = NULL;
	clist->show_all_row = NULL;
	clist->show_selected_row = 0;
	clist->show_selected_column = -1;

	clist->clist_group = NULL;
	clist->group_all_row = NULL;
	clist->group_selected_row = 0;
	clist->group_selected_column = -1;
	clist->statusbar=NULL;
}
GtkWidget* create_clist_show(GtkWidget *window_main,GtkWidget *hbox_main);

GtkWidget* create_clist_group(GtkWidget *window_main,GtkWidget *hbox_main);
void clist_group_get_selection_row(GtkCList *clist,gint row,gint column,
					GdkEventButton *event,gpointer user_data);
					
void clist_show_get_selection_row(GtkCList *clist,gint row,gint column,
					GdkEventButton *event,gpointer user_data);							
							
gboolean
on_clist_show_button_press_event           (GtkWidget       *widget,
                                        GdkEventButton  *event,
                                        gpointer         user_data);                 
gboolean
on_clist_group_button_press_event           (GtkWidget       *widget,
                                        GdkEventButton  *event,
                                        gpointer         user_data);   
 gboolean delete_info_from_clist_show(gpointer user_data);
 gboolean delete_info_from_clist_group(gpointer user_data);                                    
#endif //_CLIST_H                                       
